

<div id="ajax_poster"></div>
<script type="text/javascript">

	$(function(){
		$(".my_poster_button").click(function(){
			var id = $(this).data('id');
			var mid = $(this).data('mid');
			$.get('{SITE_URL}index.php?s=api&c=api&m=template&module={MOD_DIR}&name=mform_show-fenxiangtu-data.html&mid='+mid+'&id='+id+'&'+Math.random(),function(res){
				if(res.code==1){
					$('#ajax_poster').html(res.msg);
					var inst = $('.remodal').remodal();
					inst.open();
				}
			}, 'json');
		});
	});
	
	function shareTo(stype){
		{if $title}
	    var ftit = '{$title}';
		{else}
		var ftit = '{dr_strcut(dr_clearhtml($neirong), 70)}';
		{/if}
		
	    var flink = '内容';
		{if $imgs}
	    var lk = '{dr_url_prefix($imgs[0], MOD_DIR, SITE_ID)}';
		{else}
		var lk = '{dr_url_prefix(SITE_LOGOICO, MOD_DIR, SITE_ID)}';
		{/if}
	    //获取文章标题
	    /*ftit = $('.pctitle').text();
	    //获取网页中内容的第一张图片
	    flink = $('.d-neirong img').eq(0).attr('src');
	    if(typeof flink == 'undefined'){
	        flink='';
	    }
	    //当内容中没有图片时，设置分享图片为网站logo
	    if(flink == ''){
	        lk = 'http://'+window.location.host+'/static/images/logo.png';
	    }
	    //如果是上传的图片则进行绝对路径拼接
	    if(flink.indexOf('/uploads/') != -1) {
	        lk = 'http://'+window.location.host+flink;
	    }*/
	    //百度编辑器自带图片获取
	    if(flink.indexOf('ueditor') != -1){
	        lk = flink;
	    }
		//
	    //qq空间接口的传参
	    if(stype=='qzone'){
	        window.open('https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+document.location.href+'?sharesource=qzone&title='+ftit+'&pics='+lk+'&summary='+document.querySelector('meta[name="description"]').getAttribute('content'));
	    }
	    //新浪微博接口的传参
	    if(stype=='sina'){
	        window.open('http://service.weibo.com/share/share.php?url='+document.location.href+'?sharesource=weibo&title='+ftit+'&pic='+lk+'&appkey=2706825840');
	    }
	    //qq好友接口的传参
	    if(stype == 'qq'){
	        window.open('http://connect.qq.com/widget/shareqq/index.html?url='+document.location.href+'?sharesource=qzone&title='+ftit+'&pics='+lk+'&summary='+document.querySelector('meta[name="description"]').getAttribute('content')+'');
	    }
	    //生成二维码给微信扫描分享
	    if(stype == 'wechat'){
	        window.open('inc/qrcode_img.php?url=http://zixuephp.net/article-1.html');
	    }
	}
</script>
<style>


	
</style>

